![]() ![]() ![]() |
r
and s
are input iterators.
expression | return type | note |
---|---|---|
r.cmp(s)
|
boolean
| compare two iterators |
r.next()
|
Iterator
| advance the iterator |
r.get() |
Object |
deference the iterator |
For input iterators r.cmp(s)
does not imply that
r.next().cmp(s.next())
.
(Equality does not guarantee the substitution property or referential
transparency).
Algorithms on input iterators should never attempt to pass through the
same iterator twice.
They should be single pass algorithms.
These algorithms can be used with InputStream as the source of the
input data through the InputStreamIterator
class.
![]() ![]() ![]() |